{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Periodic features"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hour</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   hour\n",
       "0     0\n",
       "1     1\n",
       "2     2\n",
       "3     3\n",
       "4     4"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Let's create a dataframe with the hour from 0 to 23.\n",
    "\n",
    "df = pd.DataFrame([i for i in range(24)], columns=[\"hour\"])\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hour</th>\n",
       "      <th>hour_sin</th>\n",
       "      <th>hour_cos</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>0.269797</td>\n",
       "      <td>0.962917</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>0.519584</td>\n",
       "      <td>0.854419</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>0.730836</td>\n",
       "      <td>0.682553</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>0.887885</td>\n",
       "      <td>0.460065</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   hour  hour_sin  hour_cos\n",
       "0     0  0.000000  1.000000\n",
       "1     1  0.269797  0.962917\n",
       "2     2  0.519584  0.854419\n",
       "3     3  0.730836  0.682553\n",
       "4     4  0.887885  0.460065"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# We transform the feature with the sine and cosine function.\n",
    "\n",
    "df[\"hour_sin\"] = np.sin(df[\"hour\"] / df[\"hour\"].max() * 2 * np.pi)\n",
    "\n",
    "df[\"hour_cos\"] = np.cos(df[\"hour\"] / df[\"hour\"].max() * 2 * np.pi)\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.rcParams[\"figure.dpi\"] = 450"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEWCAYAAABIVsEJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgNElEQVR4nO3dfZhdZX3u8e9NBE3ry4BMIwyEBKUoNW1iR9SDRxTQoFdL0pRSUGug2miPqK3KMdS2vrSWqKditViNSInVAhYlpGpPBIIvVaAMBnkVE1Ekw1sAAyopGrj7x1pjdobZkz17Zu+1X+7Pdc2113rWWnv9ZjPsX9Z6nue3ZJuIiIip2qPqACIiojslgURERFOSQCIioilJIBER0ZQkkIiIaEoSSERENCUJJLqSpFdJ+krVccw0SYdKulbSTyS9uep4xpP0cUl/VXUc0RmUeSDRqSS9EPgA8BvAI8DNwJ/ZvrqF55wH/ADY0/aOVp1nkvN/CnjQ9p+3+9wTxHIy8DrbL6w6luhMuQKJjiTpycAXgY8C+wBDwHuAh6uMC0DS41r49gcBNzZzYIvjiniMJJDoVL8OYPs824/Y3m77K7avg+Jfx5L+c2xnSZb0BkmbJG2TdJYk1Wz/Y0k3S/qxpPWSDqpz3q+Xr9sk/VTSC8pzfVPSmZLuA94t6emSNki6T9K9kj4raaDmfD+U9HZJ10l6QNIFkp5QbttX0hfLOO+X9A1Je0jaALwE+Mfy3L8u6SmSPi1pq6TbJP2lpD1qPoPxcZ0r6WOS/qN8j29KepqkD5e/+3clL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VBxPJWzfbfsR248Cn6RP/iYk7UmRPD5r+wtlc9/9TSSB7N7VwCGS5kvaCzgRWFdxTG0n6VclPWlsGXgZcMPkR/W0dcDycnk5cHGFsVRm7Auz9Hv0wd+EJAGfAm62/aGaTX33N5GZ6A0ohyZ+GJgFnGP7fdVG1H6SDqa46gB4HPCv/fI5SDoPeDFFue67gXcBa4HPAXMpHhFwgu2e7mCu8zm8mOL2lYEfAq+v6QfoSZJeCHwDuB54tGz+C4p+kP76m0gCiYiIZuQWVkRENCUJJCIimpIEEhERTUkCiYiIpiSBREREU5JAIlpE0k/HrZ8s6R+riidipiWBRHQZSY+rOoYISAKJqISkeZI2lEUIL5M0t2w/V9LxNfv9tHx9saRvSFoH3FRR2BG7yL9kIlpntqRra9b3YWcZnI8Ca2yvkfTHwEfYffnv5wDPtv2DmQ40ohlJIBGts932wrEVSScDYw/iegGwrFz+F+ADDbzffyV5RCfJLayIzrKD8v9LSXsAe9Vs+1klEUXUkQQSUY1vUVR2BngVRXE+KAoS/na5fBywZ3vDimhcEkhENd4EnCLpOuCPgLeU7Z8EjpT0HYrbXLnqiI6VarwREdGUXIFERERTkkAiIqIpSSAREdGUJJCIiGhKEkhERDQlCSQiIpqSBBIREU35H8lsfJFxhvsOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Plot hour vs its trigonometric transformation.\n",
    "\n",
    "plt.scatter(df[\"hour\"], df[\"hour_sin\"])\n",
    "\n",
    "# Axis labels\n",
    "plt.ylabel(\"Sine of hour\")\n",
    "plt.xlabel(\"Hour\")\n",
    "plt.title(\"Sine transformation\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Cosine transformation')"
      ]
     },
     "execution_count": 6,
     "metadata": {},
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QpwCPBr2vA74QRiI/GmiDiU7HbeGZL+uuiAGkFkdeHbtT78t4BXAjOAjcAFhUZTR5J2A34CfDIiniyd1y7fCSeQ4ZXrm73tRERPet0E/JTs9l67eljS3gDpdVPB8RQiIh6OiG0R8TzwXdrkOyFpDFny+GFELEnFbfedcAIZ3gt9s0vaiaxv9mUFx1R3knaVtHv/OHAMcNfQa7W0ZcDcND4XuKbAWArTf8JM3kEbfCckiawb7d9FxFdLZrXdd8K/RK9Aqpp4EdABXBoRXyo2ovqTtD/ZVQfAjsC/tct+kHQFcCRZc90PA58HlgJXAZPJugh4d0S09APmMvvhSLLbVwHcD3yk5DlAS5L0JuA2YDXwfCr+R7LnIO31nXACMTOzPHwLy8zMcnECMTOzXJxAzMwsFycQMzPLxQnEzMxycQIxqxFJTw+YPlXSN4qKx6zanEDMmoykHYuOwQycQMwKIWmKpJtSI4Q3Spqcyi+TdGLJck+n1yMl3SZpGXBPQWGbbcf/yZjVTqekVSXTe/JiMzhfBxZHxGJJHwS+xvDNfx8KHBQR91U7ULM8nEDMaqcvImb0T0g6FejviOuvgBPS+OXAVyp4v984eVgj8S0ss8aylXRcStoB2Klk3h8LicisDCcQs2L8kqxlZ4D3kjXOB1mDhK9P48cDY+obllnlnEDMivG3wGmS7gTeD3wilX8XOELSf5Hd5vJVhzUst8ZrZma5+ArEzMxycQIxM7NcnEDMzCwXJxAzM8vFCcTMzHJxAjEzs1ycQMzMLJf/Dy6UAUVVMP15AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Plot hour vs its trigonometric transformation.\n",
    "\n",
    "plt.scatter(df[\"hour\"], df[\"hour_cos\"])\n",
    "\n",
    "# Axis labels\n",
    "plt.ylabel(\"Cosine of hour\")\n",
    "plt.xlabel(\"Hour\")\n",
    "plt.title(\"Cosine transformation\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAa8AAAE9CAYAAAC8xe1JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAAsTAAALEwEAmpwYAAA0KElEQVR4nO3deZxcVZ3//9enqrd0QpLOSlZCJEDYEmKzyY6AgH4hKmBQNChMHL7uOLIM3xGH0d+gjqIojkZFcAM0GokQjEkggkAwHbaEBEgIW0L2kIWkt6r6/P6o21jprl6qu6rure738/G4j6577lKfvr186px77jnm7oiIiJSSWNgBiIiI5ErJS0RESo6Sl4iIlBwlLxERKTlKXiIiUnKUvEREpOSUhR1AMQ0bNswnTJgQdhgiInm3fPnybe4+PF/ne9+Z/X37jmRuMTzXuMDdz8tXDB3pU8lrwoQJ1NXVhR2GiEjemdlr+Tzfth1JnlwwNqdjyke9PCyfMXSkTyUvERHpKifpqbCDaJeSl4iItOFAiuiOwKTkJSIiWaVQzUtEREqI4yQjPPatkpeIiGSlZkMRESkpDiSVvET6lp2bXiaZaKJm9GHEYhoLQEpTlGteof5VmdkdZrbFzFa2s93M7DYzW2tmz5nZtIxtM81sTbDMLF7UIu3b8srTvPLI8VQ1XkB1Yjqblk/j1WcfDDsskV4n7I+EdwIdPY19PjApWGYB/wtgZkOAm4ATgOOBm8yspqCRinQi0VRPbM/HGfuunVRUOpVVzoHj9jGs/zXs3vp62OGJ5MSBpHtOSzGFmrzc/RFgRwe7XAT80tOWAoPNbBTwPmChu+9w97eAhXScBEUKbs3SO6mqThCP718ei6d4edlt4QQl0gOpHJdiivo9rzHAGxnr64Oy9srbMLNZpGttjB8/vjBRigCNe18nHm/76bOqn2PJDSFEJNJ9jqvDRpjcfTYwG6C2tja6PwnJiXuC+oaFNDXVEY+PpX/1B4nFBoca0+BRJ+M+F1r9wdfvjVHe/4RwgsrQsK+RR+b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Oz/mb2gJk9a2YrzewjmbUoM3vbzL4RbF9qZi0j2Z8FPOX/HDEf4BIz+4elJzY8NTi+ysx+YWYrzOxpMzszKL/CzH6YEcf9ZnZGxnt+x8yeBU4CHgXODhKmSJ+n5CWSnhvpTXef4u5HAX9ptb0/sNTdpwCPAP8SlJ8MLG+1b5m7Hw98EbgpKPsM6UHwjyY9FuVdZlbVSUz9SU9GOMXd/+7pUfHXAlNy//ZEeh8lL5H0OHLnmNk3zexUd289jUsTcH/wejnpMSUBRgFbW+37xyz7nUJ6HEXc/QXgNdKzPXckSXpE/kxbSI+1KdLnqQlC+jx3f8nMppEexPXrZra41S7N/s9BQJP88++mnvQAvJkas+zXngT7f4DMPFeD7z+3VMv2+k7OKdInqOYlfZ6ZjQb2ufuvgW8D07p46GrgkC7s9yjwseC9DgXGkx5R/lVgqpnFLD2b8PGdnOdQej69jUivoJqXSHom6m+bWYr0dBVXA//TheMeJD1Tc2d+BPyvpWeWTgBXeHoW4ceAV0jPE7UaeKq9EwSdROrdfVMX3k+k19OUKCI9YGZzgWvdfU2B3+dLwG53/3kh30ekVKjZUKRnrifdcaPQdgJ3FeF9REqCal4iIlJyVPMSEZGSo+QlIiIlR8lLRERKjpKXiIiUHCUvEREpOf8/94ATv1z8jloAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 504x360 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(7, 5))\n",
    "sp = ax.scatter(df[\"hour_sin\"], df[\"hour_cos\"], c=df[\"hour\"])\n",
    "ax.set(\n",
    "    xlabel=\"sin(hour)\",\n",
    "    ylabel=\"cos(hour)\",\n",
    ")\n",
    "_ = fig.colorbar(sp)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now, let's automate feature creation from multiple variables."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "from feature_engine.creation import CyclicalFeatures"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hour</th>\n",
       "      <th>month</th>\n",
       "      <th>week</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   hour  month  week\n",
       "0     0      1     0\n",
       "1     1      2     1\n",
       "2     2      3     2\n",
       "3     3      4     3\n",
       "4     4      5     4"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's create the dataframe with 3 cyclical variables\n",
    "\n",
    "df = pd.DataFrame()\n",
    "df[\"hour\"] = pd.Series([i for i in range(24)])\n",
    "df[\"month\"] = pd.Series([i for i in range(1, 13)] * 2)\n",
    "df[\"week\"] = pd.Series([i for i in range(7)] * 4)\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "hour     23\n",
       "month    12\n",
       "week      6\n",
       "dtype: int64"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hour</th>\n",
       "      <th>month</th>\n",
       "      <th>week</th>\n",
       "      <th>hour_sin</th>\n",
       "      <th>hour_cos</th>\n",
       "      <th>month_sin</th>\n",
       "      <th>month_cos</th>\n",
       "      <th>week_sin</th>\n",
       "      <th>week_cos</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>8.660254e-01</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0.269797</td>\n",
       "      <td>0.962917</td>\n",
       "      <td>0.866025</td>\n",
       "      <td>5.000000e-01</td>\n",
       "      <td>8.660254e-01</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0.519584</td>\n",
       "      <td>0.854419</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>6.123234e-17</td>\n",
       "      <td>8.660254e-01</td>\n",
       "      <td>-0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>0.730836</td>\n",
       "      <td>0.682553</td>\n",
       "      <td>0.866025</td>\n",
       "      <td>-5.000000e-01</td>\n",
       "      <td>1.224647e-16</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>0.887885</td>\n",
       "      <td>0.460065</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>-8.660254e-01</td>\n",
       "      <td>-8.660254e-01</td>\n",
       "      <td>-0.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   hour  month  week  hour_sin  hour_cos  month_sin     month_cos  \\\n",
       "0     0      1     0  0.000000  1.000000   0.500000  8.660254e-01   \n",
       "1     1      2     1  0.269797  0.962917   0.866025  5.000000e-01   \n",
       "2     2      3     2  0.519584  0.854419   1.000000  6.123234e-17   \n",
       "3     3      4     3  0.730836  0.682553   0.866025 -5.000000e-01   \n",
       "4     4      5     4  0.887885  0.460065   0.500000 -8.660254e-01   \n",
       "\n",
       "       week_sin  week_cos  \n",
       "0  0.000000e+00       1.0  \n",
       "1  8.660254e-01       0.5  \n",
       "2  8.660254e-01      -0.5  \n",
       "3  1.224647e-16      -1.0  \n",
       "4 -8.660254e-01      -0.5  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cyclic = CyclicalFeatures(\n",
    "    variables=None,\n",
    "    drop_original=False,\n",
    ")\n",
    "\n",
    "dft = cyclic.fit_transform(df)\n",
    "\n",
    "dft.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'hour': 23, 'month': 12, 'week': 6}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cyclic.max_values_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "fsml",
   "language": "python",
   "name": "fsml"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
